<extend name="Public/base"/>

<block name="body">
    <div class="main-title">
        <h2><if condition="ACTION_NAME eq 'add'">新建<else/>查看</if>预约单</h2>
    </div>
    <form action="{:U()}" method="post" class="form-horizontal">
    <!-- 判断插入ID是否为空，如不为空隐藏插入ID值 -->
        <notempty name="data['id']">
            <input type="hidden" name="id" value="{$data['id']}"/>
        </notempty>
        <div class="form-item">
            <label class="item-label">订单编号<span class="check-tips"></span></label>
            <div class="controls">
                <input type="text" class="text input-large" value="{$data.ddbh}" disabled="false">
            </div>
        </div>
        <div class="form-item">
            <label class="item-label">顾客姓名<span class="check-tips"></span></label>
            <div class="controls">
                <input type="text" class="text input-large" value="{$data.name}" disabled="false">
            </div>
        </div>
        <div class="form-item">
            <label class="item-label">顾客手机号码<span class="check-tips"></span></label>
            <div class="controls">
                <input type="text" class="text input-large" value="{$data.phone}" disabled="false">
            </div>
        </div>
        <div class="form-item">
            <label class="item-label">顾客微信<span class="check-tips"></span></label>
            <div class="controls">
                <input type="text" class="text input-large" value="{$data.qq}" disabled="false">
            </div>
        </div>
		<div class="form-item">
            <label class="item-label">旺旺<span class="check-tips"></span></label>
            <div class="controls">
                <input type="text" class="text input-large" value="{$data.wangwang}" disabled="false">
            </div>
        </div>
		<div class="form-item">
            <label class="item-label">微博<span class="check-tips"></span></label>
            <div class="controls">
                <input type="text" class="text input-large" value="{$data.weibo}" disabled="false">
            </div>
        </div>
        <div class="form-item">
            <label class="item-label">预约日期<span class="check-tips"></span></label>
            <div class="controls">
               <input type="text" class="text input-large" <neq name="data['yytime']" value="0">  value="{$data.yytime|time_format}"</neq>  disabled="false">
        </div>
        <div class="form-item">
            <label class="item-label">线上备注<span class="check-tips"></span></label>
            <div class="controls">
              <textarea  type="text" class="text input-large" style="height: 100px;" value="{$data.bz}" disabled="false">{$data.bz}</textarea>
            </div>
        </div>
        <div class="form-item">
            <label class="item-label">线下备注<span class="check-tips"></span></label>
            <div class="controls">
              <textarea  type="text" class="text input-large" style="height: 100px;" value="{$data.xxbz}" disabled="false">{$data.xxbz}</textarea>
            </div>
        </div>
        <div class="form-item">
            <label class="item-label">获取客服<span class="check-tips"></label>
            <div class="controls">
            <volist name="kefu" id="vo">  
                <eq name="vo.uid" value="$data.kf"><input type="text" class="text input-large" value="{$vo.nickname}" disabled="false"></eq>
            </volist>   
            </div>
        </div>
        <div class="form-item">
            <label class="item-label">线上接待门市<span class="check-tips"></span></label>
            <div class="controls">
                    <span>
                      <volist name="xianshang" id="vo">     
                            <eq name="vo.uid" value="$data.xsjd"><input type="text" class="text input-large" value="{$vo.nickname}" disabled="false"></eq>
                      </volist>
                    </span>
            </div>
        </div>
        <div class="form-item">
            <label class="item-label">线下接待门市<span class="check-tips"></span></label>
            <div class="controls">
                    <span>
                      <volist name="xianxia" id="vo">     
                            <eq name="vo.uid" value="$data.xxjd"><input type="text" class="text input-large" value="{$vo.nickname}" disabled="false"></eq>
                      </volist>
                    </span>
            </div>
        </div>
           <div class="form-item">
            <label class="item-label">套系价格<span class="check-tips"></span></label>
            <div class="controls">
                <input type="text" class="text input-large" value="{$data.setmoney}" disabled="false">
            </div>
        </div>
        <div class="form-item">
            <label class="item-label">订单金额<span class="check-tips"></span></label>
            <div class="controls">
                <input type="text" class="text input-large" value="{$data.money}" disabled="false">
            </div>
        </div>
		<div class="form-item">
                <label class="item-label">支付款项<span class="check-tips"></span></label>
                <div class="controls">
                    <select name="zfkx" disabled="false">
							<option value="">无</option>
						<volist name="zfkx" id="vo">
							<option value="{$vo.uid|default=null}" <eq name="vo.uid" value="$data.zfkx"> selected</eq>>{$vo.name|default=null}</option>
						</volist>
					</select>
                </div>
            </div>
		<div class="form-item">
			<label class="item-label">支付方式<span class="check-tips"></span></label>
			<div class="controls">
						
				<select name="zffs" disabled="false">
						<option value="">无</option>
					<volist name="zffs" id="vo">
						<option value="{$vo.uid|default=null}" <eq name="vo.uid" value="$data.zffs"> selected</eq>>{$vo.name|default=null}</option>
					</volist>
				</select>
			</div>
		</div>
		<div class="form-item">
			<label class="item-label">排档时间<span class="check-tips"></span></label>
			<div class="controls">
				 <input type="text" placeholder="请输入拍档开始时间" class="text  laydate-icon" onclick="laydate({istime: true, format: 'YYYY-MM-DD'})" name="pdtimes"  <neq name="data['pdtimes']" value="0">value="{$data.pdtimes|date="Y-m-d",###}" </neq>  disabled="false"> - 
				 <input type="text" placeholder="请输入拍档结束时间" class="text  laydate-icon" onclick="laydate({istime: true, format: 'YYYY-MM-DD'})" name="pdtimee"  <neq name="data['pdtimee']" value="0">value="{$data.pdtimee|date="Y-m-d",###}" </neq>  disabled="false">
			</div>
		
        <div class="form-item">
            <label class="item-label">订单状态<span class="check-tips"></span></label>
            <div class="controls">
            <volist name="state" id="vo">
            <eq name="vo.uid" value="$data.ywstate"><input type="text" class="text input-large" value="{$vo.name}" disabled="false"></eq>
            </volist>
            </div>
        </div>
		<neq name="data.ddtime" value="">
		<div class="form-item">
            <label class="item-label">成交时间<span class="check-tips"></span></label>
            <div class="controls">
            <input type="text" class="text input-large" value="{$data.ddtime|date="Y-m-d H:m",###}" disabled="false">
            </div>
        </div>
		</neq>
        <div class="form-item">
            <label class="item-label">渠道<span class="check-tips"></span></label>
            <div class="controls">
				<volist name="qudao" id="vo">
				<eq name="vo.uid" value="$data.qd"><input type="text" class="text input-large" value="{$vo.name}" disabled="false"></eq>
				</volist>
			</div>
        </div>
		<div class="form-item">
            <label class="item-label">来源信息<span class="check-tips">(例：如果渠道是百度可以输入搜索关键词）</span></label>
            <div class="controls">
                <input type="text" class="text input-large" name="qdly" value="{$data.qdly}" disabled="false">
            </div>
        </div>		
        <div class="form-item">
            <label class="item-label">业务类别<span class="check-tips"></span></label>
            <div class="controls">
            <volist name="liebei" id="vo">
            <eq name="vo.uid" value="$data.lb"><input type="text" class="text input-large" value="{$vo.name}" disabled="false"></eq>
            </volist>
            </div>

        </div>   
        <div class="form-item">
            <label class="item-label">推荐人<span class="check-tips"></span></label>
            <div class="controls">
               <input type="text" class="text input-large" value="{$data.tj}" disabled="false">
            </div>
        </div>
		<div class="items">
            <label class="item-label">操作日志<span class="check-tips"></span></label>
            <div class="controls">
              <table style="background: white;    border-collapse: collapse;    width: 70%;    border: 1px #D0E3EF solid;">
              <thead>
                <tr>
                   <th class="">ID</th>
                   <th class="">操作名称</th>
				   <th class="">状态</th>
                   <th class="">用户</th>
                   <th class="">ip</th>
                   <th class="">日期</th>
                </tr>
               </thead>   
                <volist name="action_log" id="vo">
                    <tbody>
                      <tr>
                      <td>{$vo.id}</td>
                      <td>{:get_action($vo['action_id'], "title")}</td>
					  <td>{:get_ywstatus($vo['ywstatus'])}</td>
                      <td>{:get_nickname($vo['user_id'])}</td>
                      <td>{:long2ip($vo['action_ip'])}</td>
                      <td>{$vo.create_time|date="Y-m-d h:i:s",###}</td>
                      </tr>
                    </tbody>
                </volist>
              </table>
            </div>
        </div>	
        <div class="form-item">
            <button class="btn btn-return" onclick="javascript:history.back(-1);return false;">返 回</button>
        </div>
    </form>

</block>

<block name="script">
    <script type="text/javascript">
        //导航高亮
        highlight_subnav('{:U('Ywxt/index')}');
    </script>
</block>
